import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    component: () => import('@/views/login/login.vue')
  },
  {
    path: '',
    redirect: '/home',
    component: () => import('@/views/index.vue'),
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/gongdan/home.vue')
      },
      {
        path: '/task/business',
        component: () => import('@/views/home/gongdan/yunying.vue')
      },
      {
        path: '/task/operation',
        component: () => import('@/views/home/gongdan/yunwei.vue')
      },
      {
        path: '/node/region',
        component: () => import('@/views/home/node/region.vue')
      },
      {
        path: '/node/node',
        component: () => import('@/views/home/node/node.vue')
      },
      {
        path: '/node/partner',
        component: () => import('@/views/home/node/partner.vue')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
